import request from '@/utils/request'

// 查询交货列表
export function listGoodPath(query) {
  return request({
    url: '/erp/goodpath/list',
    method: 'get',
    params: query
  })
}
// 查询交货列表详细
export function getGoodPath(routeId) {
  return request({
    url: '/erp/goodpath/' + routeId,
    method: 'get'
  })
}
// 新增交货列表
export function addGoodPath(data) {
  return request({
    url: '/erp/goodpath',
    method: 'post',
    data: data
  })
}
// 修改交货列表
export function updateGoodPath(data) {
  return request({
    url: '/erp/goodpath',
    method: 'put',
    data: data
  })
}
// 交货列表在航层检查修改
export function changeGoodPathCheckOnLineLevel(routeId, checkOnLineLevel) {
  const data = {
    routeId,
    checkOnLineLevel
  }
  return request({
    url: '/erp/goodpath/changeCheckOnLineLevel',
    method: 'put',
    data: data
  })
}
// 删除交货列表
export function delGoodPath(routeIds) {
  return request({
    url: '/erp/goodpath/' + routeIds,
    method: 'delete'
  })
}

// 导出交货列表
export function exportGoodPath(query) {
  return request({
    url: '/erp/goodpath/export',
    method: 'get',
    params: query
  })
}